package com.xiaozhengkeji.xiaozhengblog.events;

import com.xiaozhengkeji.xiaozhengblog.base.entitys.SystemUserEntity;
import lombok.Data;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;

/**
 * 用户登录事件 用来跟踪记录
 */

@Slf4j
@Getter
public class UserLoginEvent extends ApplicationEvent {
    public SystemUserEntity systemUserEntity;
    public String loginIp;
    public String Token;
    public Boolean isLoginSuccess;

    public UserLoginEvent(Object source, SystemUserEntity systemUserEntity, String loginIp, String token, Boolean isLoginSuccess) {
        super(source);
        this.systemUserEntity = systemUserEntity;
        this.loginIp = loginIp;
        Token = token;
        this.isLoginSuccess = isLoginSuccess;
    }
}
